/*
 * @(#)SearchProfile.java 0.0.1-SNAPSHOT
 *
 * Copyright Group B
 */

package grupb.upf.ms.impl;

import grupb.upf.ms.DescriptionContent;
import java.io.Serializable;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * <p>This component implements a SearchProfile interface. It cointains the
 * content of a SearchProfile message.</p>
 *
 *
 * @version    0.0.1-SNAPSHOT
 * @author     Group B
 */
public final class SearchProfile implements grupb.upf.ms.SearchProfile,
        Serializable {

    /**
     * The logger. A new logger <code>grupb.upf.ms.SearchProfile</code> is
     * created to add the logs of this SearchProfile.
     */
    private static final Log LOG = LogFactory.getLog(SearchProfile.class);
    /**
     * The serialVersionUID is created to be able to serialize this class, it's
     * necessary because it will be sent.
     */
    private static final long serialVersionUID = 1L;
    /**
     * The description of the searched content.
     */
    private DescriptionContent desContent;

    /**
     * This is the constructor of the searchProfile.
     * @param descriptionContent the description of the searched object
     */
    public SearchProfile(final DescriptionContent descriptionContent) {
        this.desContent = descriptionContent;
    }

    /**
     * This method allows us to set up the propierties of a new search, what we
     * are looking for.
     * @param descriptionContent the properties of the searched content
     */
    @Override
    public void setSearchProfile(final DescriptionContent descriptionContent) {
        this.desContent = descriptionContent;
    }

    /**
     * This method allows us to recover the info of a SearchProfile message
     * that we have receive from another user.
     * @return the description of the searched content
     */
    @Override
    public DescriptionContent getSearchProfile() {
        return this.desContent;
    }
}
